/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * MainForm.java
 *
 * Created on Mar 22, 2010, 3:41:02 PM
 */

package Library.GUI;

/**
 *
 * @author ssaad
 */
public class MainForm extends javax.swing.JFrame {

    /** Creates new form MainForm */
    public MainForm() {
        initComponents();
        reservation1.setVisible(false);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        reservation1 = new Library.GUI.Reservation_Panel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenu3 = new javax.swing.JMenu();
        jMenu5 = new javax.swing.JMenu();
        jMenu7 = new javax.swing.JMenu();
        jMenu8 = new javax.swing.JMenu();
        jMenu11 = new javax.swing.JMenu();
        jMenu12 = new javax.swing.JMenu();
        jMenu13 = new javax.swing.JMenu();
        jMenu4 = new javax.swing.JMenu();
        jMenu2 = new javax.swing.JMenu();
        jMenu6 = new javax.swing.JMenu();
        mnuReservation = new javax.swing.JMenu();
        mnuLoan = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jMenu1.setText("File");

        jMenu3.setText("Exit");
        jMenu1.add(jMenu3);

        jMenuBar1.add(jMenu1);

        jMenu5.setText("Register");

        jMenu7.setText("Member");
        jMenu5.add(jMenu7);

        jMenu8.setText("Item");
        jMenu5.add(jMenu8);

        jMenuBar1.add(jMenu5);

        jMenu11.setText("Loan");

        jMenu12.setText("Borrow");
        jMenu11.add(jMenu12);

        jMenu13.setText("Return");
        jMenu11.add(jMenu13);

        jMenuBar1.add(jMenu11);

        jMenu4.setText("Reservation");

        jMenu2.setText("Item");
        jMenu4.add(jMenu2);

        jMenuBar1.add(jMenu4);

        jMenu6.setText("Report");

        mnuReservation.setText("Reservations");
        mnuReservation.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                mnuReservationMouseClicked(evt);
            }
        });
        jMenu6.add(mnuReservation);

        mnuLoan.setText("Loans");
        mnuLoan.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                mnuLoanMouseClicked(evt);
            }
        });
        jMenu6.add(mnuLoan);

        jMenuBar1.add(jMenu6);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(reservation1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(reservation1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void mnuReservationMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_mnuReservationMouseClicked
        // TODO add your handling code here:
        reservation1.setVisible(true);
    }//GEN-LAST:event_mnuReservationMouseClicked

    private void mnuLoanMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_mnuLoanMouseClicked
        // TODO add your handling code here:
        //LoanForm loanForm = new LoanForm();
        //loanForm.
        //loanForm.setVisible(true);
    }//GEN-LAST:event_mnuLoanMouseClicked

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new MainForm().setVisible(true);
                
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu11;
    private javax.swing.JMenu jMenu12;
    private javax.swing.JMenu jMenu13;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenu jMenu4;
    private javax.swing.JMenu jMenu5;
    private javax.swing.JMenu jMenu6;
    private javax.swing.JMenu jMenu7;
    private javax.swing.JMenu jMenu8;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenu mnuLoan;
    private javax.swing.JMenu mnuReservation;
    private Library.GUI.Reservation_Panel reservation1;
    // End of variables declaration//GEN-END:variables

}
